# Contributor: Damian Kurek <starfire24680@gmail.com>
# Maintainer: Damian Kurek <starfire24680@gmail.com>
pkgname=kodi-pvr-iptvsimple
pkgver=19.1.1
_realname=Matrix
pkgrel=0
pkgdesc="IPTV Simple client addon for Kodi"
options="!check" # no test suite
url="https://github.com/kodi-pvr/pvr.iptvsimple"
arch="x86 x86_64 aarch64 armv7" # kodi is only available on those architectures
license="GPL-2.0-only"
makedepends="cmake kodi-dev"
source="$pkgname-$pkgver-$_realname.tar.gz::https://github.com/kodi-pvr/pvr.iptvsimple/archive/$pkgver-$_realname.tar.gz"
builddir="$srcdir/pvr.iptvsimple-$pkgver-$_realname"

build() {
	cmake -B build \
		-DCMAKE_BUILD_TYPE=None \
		-DCMAKE_INSTALL_PREFIX=/usr \
		-DCMAKE_MODULE_PATH=/usr/lib/cmake/kodi \
		-DUSE_LTO=1
	cmake --build build
}

package() {
	DESTDIR="$pkgdir" cmake --build build --target install
}

sha512sums="
20ee141fc7099050158111f647c4ef861f2ea468348ba5533b488302d8d44249b082bf34bfd9af028c654a583904e3067ad1f757b8fc8ad3453e69c8ca655b62  kodi-pvr-iptvsimple-19.1.1-Matrix.tar.gz
"
